Developer --> Technical Publications
PATHJava Developer Documentation > Mac OS Runtime for Java > JManager > Programming With JManager


Applet Page Functions

At times you may want two or more applets to share information. To do so, the applets must share the same applet page. Applets instantiated in the same page share the same class loader (and therefore the same static variables). The following functions let you create or remove applet pages and instantiate AWT contexts (and therefore applets) within them.


JMNewAppletPage

Creates a new applet page.

OSStatus JMNewAppletPage (
                     JMAppletPageRef* page,
                     JMSessionRef session);
page
A pointer to the applet page. On return, this parameter is the new applet page.
session
The session in which you want to create the applet page.
function result
A result code; see JManager Result Codes.

DESCRIPTION

Applets instantiated within the same page share the same static variables, so they may share information between them.


JMDisposeAppletPage

Removes an applet page.

OSStatus JMDisposeAppletPage (JMAppletPageRef page);
page
The page you want to remove.
function result
A result code; see JManager Result Codes.

JMNewAWTContextInPage

Creates an AWT context within an applet page.

OSStatus JMNewAWTContextInPage (
                     JMAWTContextRef* context,
                     JMSessionRef session,
                     JMAppletPageRef page,
                     const JMAWTContextCallbacks* callbacks,
                     JMClientData data);
context
A pointer to the AWT context. On return, this parameter is the new AWT context.
session
The session in which you want to create the AWT context.
page
The applet page in which you want to create the AWT context.
callbacks
A pointer to the context's callbacks. See AWT Context Callbacks Structure for more information.
data
Any optional client-specific data.
function result
A result code; see JManager Result Codes.

DESCRIPTION

The JMNewAWTContextInPage function operates the same as the JMNewAWTContext function, but the instantiated AWT context is associated with an applet page. You can instantiate multiple AWT contexts within an applet page and all the applets within them can share static variables.

SEE ALSO

Creating an AWT Context.

The JMDisposeAWTContext function.


© 1998 Apple Computer, Inc. — (Last Updated 3 Dec 98)

Previous | Back Up One Level | Next |